/* 
 * File:   Storage.h
 * Author: Imre Tabur
 *
 */
#ifndef CLOUDY_STORAGE_STORAGE_H
#define	CLOUDY_STORAGE_STORAGE_H

#include <string>
#include <vector>
#include "FileThread.h"
#include "File.h"
#include "IConnector.h"

namespace CloudyStorage {

    /**
     * Storage system class.
     * 
     */
    class Storage {
        static Storage *singletone;
        std::vector<FileThread *> fileThreads;
        std::vector<IConnector *> connectors;
    public:
        std::string folder;
        Storage();
        virtual ~Storage();
        static Storage * instance();
        FileThread *pull(const char *name);
        FileThread *pull(const std::string &name);
        void push(const File &file);
        void stop();
        void join();
        void deleteThreads();
        void closeConnectors();
        void deleteConnectors();
    private:
    };
}
#endif	/* CLOUDY_STORAGE_STORAGE_H */
